;
(function() {
	module.exports = {
		prefix: "/bus/sendmsg",
		get: {
			"/user_list": function() {
				var bus = role.getBus(this);
				this.body = ResponObj("json", bus.getSendAbleUserList());
			}
		},
		post: {
			"/send_mail": function() {
				var bus = role.getBus(this);
				var body = this.request.body;
				body.content = body.content.trim();
				if (!body.content) {
					throwCusError("站内信内容不可为空")
				}
				bus.sendMailToUserList(body);
				this.body = ResponObj("string", "站内信已发送");
			},
		},
	}
	var role = require("./role");
	var BusCon = require("../../core/bus/_con");
	var UserCon = require("../../core/user/_con");
	var GoodsCon = require("../../core/goods/_con");
	var AchCon = require("../../core/ach/_con");
	var db = require("../../core/db/index");
	var config = require("../../core/_include/config");
	var ResponObj = require("../_include/responObj");
}());